<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title></title>
</head>
<body>
<div class="menu-wrap" th:fragment="menu">
    <ul class="menus">
        <li class="menu" th:each="menu : ${menus}">
            <a th:if="${#lists.isEmpty(menu.subs)}" th:href="${menu.url}" th:text="${menu.title}" target="main"/>
            <span class="top-menu" th:unless="${#lists.isEmpty(menu.subs)}" th:text="${menu.title}"></span>
            <ul th:unless="${#lists.isEmpty(menu.subs)}">
                <li class="menu"  th:each="sub : ${menu.subs}">
                    <a th:href="@{${sub.url}}" th:text="${sub.title}" target="main"/>
                </li>
            </ul>
        </li>
    </ul>
</div>
</body>
</html>